package com.peach.service.UserManage;

import com.peach.domain.UserManage.Manager;
import com.peach.domain.UserManage.User;
import com.peach.utils.SqlConfig;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("ManagerApplication")
public class ManagerApplicationImpl implements ManagerApplication{
    private static SqlSessionTemplate sqlSessionTemplate = SqlConfig.sessionTemplateConfigure();
    public List<Manager> login(Manager manager){

        return sqlSessionTemplate.selectList("ManagerMapper.selectManagerWithId",manager);

    }

    public List<User> getAllUser(){

        return sqlSessionTemplate.selectList("UserMapper.selectAllUser");

    }
}
